#ifndef MODULE_H__
#define MODULE_H__

#include "declaration.h"
#include "import.h"

#if 0
import declaration;
import import;
#endif

struct Module
{
	struct ImportList* imports;
	struct DeclarationList* declarations;
};

struct Module* allocateModule(
	struct ImportList* imports,
	struct DeclarationList* declarations)
{
	struct Module* r = malloc(sizeof(struct Module));
	r->imports = imports;
	r->declarations = declarations;
	return r;
}

void freeModule(struct Module* f)
{
	if(f == NULL) return;
	freeImportList(f->imports);
	freeDeclarationList(f->declarations);
	free(f);
}

#endif
